package LxTest;

public class MyStringTest {
    public static void main(String[] args) {
        String s1 = "Hello java";
        String s2 = "Hello java";

        if (s1.equals(s2)){
            String nospaces = s1.replace(" ", "");



            String finals = nospaces.replace("java" , "word");

            System.out.println("输出修改后的为 " + finals);
        }else {
            System.out.println("字符串不相等");
        }
    }
}
